#ifndef Common_h__
#define Common_h__

#include <map>
#include <vector>
#include <string>
#include "JME_GLog.h"
#include "boost/shared_ptr.hpp"
#include "google/protobuf/message.h"
#include "JME_Dispatcher.h"

#include "Trace.h"

using namespace std;

#define USING_NAMESPACE_JMENGINE \
using namespace JMEngine;

#define USING_NAMESPACE_JMENGINE_NET \
using namespace JMEngine::net;

#define USING_NAMESPACE_JMENGINE_RPC \
using namespace JMEngine::rpc;

#define USING_NAMESPACE_JMENGINE_SERVER \
using namespace JMEngine::server;

#define USING_NAMESPACE_JMENGINE_GAME \
using namespace JMEngine::game;

#define USING_NAMESPACE_JMENGINE_DB \
using namespace JMEngine::db;

typedef JMEngine::game::JME_Dispatcher<int, google::protobuf::Message*> MessageDispatcher;
#define Dispatcher boost::detail::thread::singleton<MessageDispatcher>::instance()


#define __TRY__ \
	try {

#define __CATCH_CHAR_ERROR__ \
	} \
	catch(const char* e) \
	{

#define __CATCH_STD_EXCEPT_ERROR__ \
	} \
	catch(const std::exception& e) \
	{

#define __TRY_END__ \
	}
#endif // Common_h__
